export default async (that)=>{
	return {
		columns:[
			{
				key:"no",
				label:"支付订单号",
				width:170
			},
			{
				key:"openId",
				label:"用户id",
				props:{
					"show-overflow-tooltip":true
				}
			},
			{
				key:"totalPrice",
				label:"支付金额"
			},
			{
				key:"refundTotal",
				label:"已退款"
			},
			{
				key:"shopName",
				label:"所属店铺",
				props:{
					"show-overflow-tooltip":true
				}
			},
			{
				key:"successTime",
				label:"支付时间",
				slot:"successTime",
				width:160
			},
			{
				key:"billNoList",
				label:"支付账单",
				slot:"billNoList",
				// props:{
				// 	"show-overflow-tooltip":true
				// }
			},
			{
				key:"status",
				label:"支付状态",
				slot:"status"
			},

			{
				key:"operation",
				label:"操作",
				slot:"operation",
				// width:250,
				props:{
					fixed:"right"
				},
				removeBtn:{
					show:false,
					permission:""
				},
				editBtn:{
					show:false,
					permission:""
				},

			}
		],
		reqOptions:{
			list:{
				method:"get",
				url:"/pay/wxOrder",
			},
			insert:{
				method:"post",
				url:"/pay/wxOrder"
			},
			update:{
				method:"put",
				url:"/pay/wxOrder"
			},
			remove:{
				method:"delete",
				url:"/pay/wxOrder/${id}"
			}
		},
		search:{
			form:{},
			attrs:{
				gutter:20,
			},
			options:[
				{
					key:"no",
					type:"el-input",
					label:"支付订单号",
					width:"150px",
					span:6,
					props:{
						clearable:true
					}

				},
				{
					key:"openId",
					type:"el-input",
					width:"150px",
					label:"用户id",
					span:6,
					props:{
						clearable:true
					}

				},
				{
					key:"billNoList",
					type:"el-input",
					width:"150px",
					label:"包含账单",
					props:{
						clearable:true
					}
				},
				{
					key:"status",
					type:"el-select",
					label:"订单状态",
					width:"100px",
					options:[
						{
							label:"未支付",
							value:0
						},
						{
							label:"已支付",
							value:1
						},
						// {
						// 	label:"已过期",
						// 	value:2
						// },
						{
							label:"退款中",
							value:3
						},
						{
							label:"已退款",
							value:4
						},
						{
							label:"退款异常",
							value:5
						},
						{
							label:"退款关闭",
							value:6
						}
					],
					props:{
						clearable:true,
					}
				},
				{
					key:"test",
					type:"el-button",
					label:"查询",
					span:6,
					// label:"  ",
					removeLabel:true,
					width:false,
					props:{
						type:"primary"
					},
					listeners:{
						click(...e){
							that.searchFun && that.searchFun instanceof Function && that.searchFun(...e)
							that.$emit("search")
							console.log("click")
							that.getList()
						}
					}
				},
			],
			direction:"h",
			labelPosition:"right"
		},
		operation:{
			form:{},
			options:[
				// false
			],
			direction:"h"
		},
		updateField:async (form={})=>{
			return {
				form,
				direction:"h",
				options:[
					{
						key:"no",
						type:"el-input",
						label:"订单号",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"openId",
						type:"el-input",
						label:"生成的用户身份标识",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"totalPrice",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"Double",
						required:true
					},
					{
						key:"appId",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"nonceStr",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"packageValue",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"timestamp",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"paySign",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"expiredTime",
						type:"el-input",
						label:"订单过期时间_10位时间戳",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"successTime",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"billNoList",
						type:"el-input",
						label:"",
						span:8,
						props:{
							clearable:true,
						},
						other:"String",
						required:true
					},
					{
						key:"status",
						type:"el-input",
						label:"支付状态",
						span:8,
						props:{
							clearable:true,
							type:"number",
						},
						other:"Integer",
						required:true
					},
				]
			}
		},
		config:{
			table:{
				checkbox:false
			}
		}
	}
}